import torch
print(torch.__version__)
print(torch.cuda.is_available())
print(torch.version.cuda)

# 检查可用的GPU设备
if torch.cuda.is_available():
    n_gpus = torch.cuda.device_count()
    print(f"Available GPUs: {n_gpus}")
    for i in range(n_gpus):
        print(f"GPU {i}: {torch.cuda.get_device_name(i)}")
else:
    print("No GPUs available. Using CPU.")